﻿<%@ Page Language="C#" MasterPageFile="~/FrameMasterPage.master" AutoEventWireup="true" CodeFile="OwnDetail.aspx.cs" Inherits="OwnDetail" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="m_contentBody" Runat="Server">
<asp:Panel runat="server" ID="pnlBody">
<body>

   <table cellspacing="2" cellpadding ="3" style="height:100%" class="GridItem"  >
        <br />
        <tr >
            <asp:Label ID="lblPermission" runat="server" CssClass="permissionstyle"></asp:Label>
            <td colspan="2"><strong> Ownership detail </strong> </td>  </br></br>
            <td></td>
        </tr>
      <tr>
         <td style="height: 28px"><asp:Label ID="Label1" runat="server" Text="Employee:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblEmployee" runat="server" ></asp:Label>
             <asp:TextBox ID="txtHiddenTypeId" runat="server" Visible="False"></asp:TextBox>
          </td>    
      </tr>
      
      
      
      <tr>
         <td style="height: 28px"><asp:Label ID="Label10" runat="server" Text="Building:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblBuilding" runat="server" ></asp:Label></td>    
      </tr>
      
      <tr>
         <td style="height: 28px"><asp:Label ID="Label6" runat="server" Text="Location:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblLocation" runat="server" ></asp:Label></td>    
      </tr>
      
      <tr>
         <td style="height: 28px"><asp:Label ID="Label2" runat="server" Text="Department:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblDepartment" runat="server" ></asp:Label></td>    
      </tr>
      
      <tr>
         <td style="height: 28px"><asp:Label ID="Label3" runat="server" Text="Date Enter:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblDateEnter" runat="server" ></asp:Label></td>    
      </tr>
      
      <tr>
         <td style="height: 28px"><asp:Label ID="Label4" runat="server" Text="Code Equipment  "></asp:Label>
         </td>
         <td style="height: 28px">
         <strong> <asp:Label ID="lblCodeEquipment" runat="server" ></asp:Label></strong>
         <br />
          <asp:GridView ID="grdCompose" runat="server" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" 
                    CssClass="GridItem"  
                    PageSize="15" RowHeaderColumn="EquipmentId" 
                    Width="96%" DataSourceID="dsOwnerEquipment" 
                 onrowcommand="grdCompose_RowCommand">
                    <SelectedRowStyle BackColor="Yellow" />
                    <HeaderStyle BorderStyle="None" CssClass="GridViewHeader" Height="20px" 
                        Width="30px" />
                    <Columns>
                    <asp:CommandField ShowSelectButton="True" />
                     
                        <asp:BoundField DataField="TYPEEQUIPMENT" HeaderText="Equipment type" 
                            ReadOnly="True">
                            <ItemStyle Width="120px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="Model" DataField="MODEL" >
                        <ItemStyle Width="120px" />
                        </asp:BoundField>
                        
                        <asp:BoundField DataField="CAPACITY" HeaderText="Capacity" >
                        <ItemStyle Width="120px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="DATECREATION" HeaderText="Date create" />
                    </Columns>
                    <PagerStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    <EditRowStyle BackColor="LightGray" />
                    <RowStyle CssClass="AlternativeRowStyle" />
                    <AlternatingRowStyle BackColor="White" CssClass="AlternativeRowStyle" />
                </asp:GridView>
                 
       
             <asp:ObjectDataSource ID="dsOwnerEquipment" runat="server" 
                 SelectMethod="GetOwnerEquipment" TypeName="DirectService" 
                 OldValuesParameterFormatString="original_{0}">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="txtHiddenTypeId" Name="codeNumber" 
                         PropertyName="Text" Type="String" />
                 </SelectParameters>
             </asp:ObjectDataSource>
         </td>    
      </tr>
      
      <tr>
         <td style="height: 28px"><asp:Label ID="Label5" runat="server" Text="Type Equipment:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblTypeequipment" runat="server" ></asp:Label></td>    
      </tr>
      
      <tr>
         <td style="height: 28px"><asp:Label ID="Label8" runat="server" Text="Model:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblModel" runat="server" ></asp:Label></td>    
      </tr>
       
      <tr>
         <td style="height: 28px"><asp:Label ID="Label9" runat="server" Text="System:  "></asp:Label></td>
         <td style="height: 28px">
         <asp:Label ID="lblSystem" runat="server" ></asp:Label></td>    
      </tr>      
      
      <tr>
            <td></td>
            <td style="height: 28px"><strong><asp:Label ID="Label7" runat="server" Text="Equipment History  "></asp:Label></strong></td>    
      </tr>
      <tr>
         <td></td>
         <td>
         <asp:GridView ID="grdHistory" runat="server" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" 
                    CssClass="GridItem"  
                    PageSize="15" RowHeaderColumn="EquipmentId" 
                    Width="96%" DataSourceID="dsHistoryEquipment" 
                 onrowcommand="grdHistory_RowCommand">
                    <SelectedRowStyle BackColor="Yellow" />
                    <HeaderStyle BorderStyle="None" CssClass="GridViewHeader" Height="20px" 
                        Width="30px" />
                    <Columns>
                    <asp:CommandField ShowSelectButton="True" />
                      <%--  <asp:CommandField DeleteText="" InsertText="" ShowEditButton="True">
                            <ItemStyle Width="40px" />
                        </asp:CommandField>--%>
                        
                       <%-- <asp:ButtonField CommandName="Delete" Text="Delete">
                            <ItemStyle Width="20px" />
                        </asp:ButtonField>--%>
                        <asp:BoundField DataField="DateEnter" HeaderText="Date start of use" 
                            ReadOnly="True">
                            <ItemStyle Width="120px" />
                        </asp:BoundField>
                        <asp:BoundField   HeaderText="Date end of use"  ReadOnly ="true" 
                            DataField="DateEnter">
                        <ItemStyle Width="120px" />
                        </asp:BoundField>
                        
                        <asp:BoundField DataField="employeename" HeaderText="Employee name" >
                        <ItemStyle Width="120px" />
                        </asp:BoundField>
                    </Columns>
                    <PagerStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    <EditRowStyle BackColor="LightGray" />
                    <RowStyle CssClass="AlternativeRowStyle" />
                    <AlternatingRowStyle BackColor="White" CssClass="AlternativeRowStyle" />
                </asp:GridView>
                 
       
             <asp:ObjectDataSource ID="dsHistoryEquipment" runat="server" 
                 SelectMethod="GetHistoryEquipment" TypeName="DirectService">
                 <SelectParameters>
                     <asp:ControlParameter ControlID="txtHiddenTypeId" Name="codeNumber" 
                         PropertyName="Text" Type="String" />
                 </SelectParameters>
             </asp:ObjectDataSource>
                 
       
         </td>  
      </tr>
      
     
          
  </table>

</body>
</asp:Panel>

</asp:Content>